def get(self, request):
    # 获取参数
    start_date = request.GET.get("sd", "")  # 起始时间
    end_date = request.GET.get("ed", "")  # 结束时间
    area_id = request.GET.get("aid", "")  # 区域编号
    sort_key = request.GET.get("sk", "new")  # 排序关键字
    page = request.GET.get("p")  # 页

    if start_date:
        start_date = datetime.datetime.strptime(start_date, "%Y-%m-%d")
    else:
        start_date = datetime.datetime.now()

    if end_date:
        end_date = datetime.datetime.strptime(end_date, "%Y-%m-%d")

    if area_id:
        try:
            area = Area.objects.get(id=area_id)
        except Exception as e:
            return JsonResponse({'errno': '400',
                                 'errmsg': '区域参数有误'})
    else:
        area_id = 1

    # 处理页数
    try:
        page = int(page)
    except Exception as e:
        page = 1
    if end_date:
        # if start_date and end_date:
        conflict_orders = Order.objects.filter(
            begin_date__lte=end_date, end_date__gte=start_date).all()
    else:
        conflict_orders = Order.objects.filter(end_date__gte=start_date).all()
    if conflict_orders:
        # 从订单中获取冲突的房子 id
        conflict_house_ids = [order.house_id for order in conflict_orders]
        id = request.user.id
        house_list = []
        for conflict_order in conflict_orders:
            print(conflict_order.house.area.id)
            if conflict_order.user.id == id:
                # 是自己的房源
                continue
            else:
                print('不是自己房源')
                print(type(area_id))
                print(type(conflict_order.house.area.id))
                if conflict_order.house.area.id == int(area_id):
                    house_list.append({
                        'address': conflict_order.house.address,
                        'area_name': conflict_order.house.area.name,
                        'ctime': conflict_order.house.create_time,
                        'house_id': conflict_order.house.id,
                        'img_url': "http://qjoo6qdoq.hd-bkt.clouddn.com/" + conflict_order.house.index_image_url,
                        'order_count': conflict_order.house.order_count,
                        'price': conflict_order.house.price,
                        'room_count': conflict_order.house.room_count,
                        'title': conflict_order.house.title,
                        'user_avatar': "http://qjoo6qdoq.hd-bkt.clouddn.com/" + request.user.avatar.name
                    })
            print('8888888888888')
            print(house_list)
            paginator = Paginator(house_list, 5)
            return JsonResponse({
                'data': {
                    'houses': house_list,
                    'total_page': paginator.num_pages
                },
                'errmsg': '请求成功',
                'errno': '0'
            })

    else:
        # 起止时间不满足则不进行接下来的筛选判断
        # conflict_house_ids = []
        return JsonResponse({
            'data': {
                # 'houses': house_list,
                # 'total_page': paginator.num_pages
            },
            'errmsg': '请求成功',
            'errno': '0'
        })